package com.hzlj.position.config.service;

import com.fz.common.base.dto.DeleteCommonDTO;
import com.fz.common.base.dto.PageParamDTO;
import com.fz.common.base.dto.QueryPageResultDTO;
import com.hzlj.position.config.common.dto.jzJbxxDeviceBind.*;

import java.util.List;

/**
 * 设备绑定表(JzJbxxDeviceBind)表服务接口
 *
 * @author lifh
 * @date 2023-03-13 16:57:41
 */
public interface JzJbxxDeviceBindService {
    /**
     * 查询单条数据
     */
    JzJbxxDeviceBindQueryResultDTO getJzJbxxDeviceBindById(String id);


    JzJbxxDeviceBindQueryResultDTO getJzJbxxDeviceBindByJzId(String jzId, String channel);

    /**
     * 新增数据
     */
    JzJbxxDeviceBindQueryResultDTO saveJzJbxxDeviceBind(JzJbxxDeviceBindAddDTO dto);

    /**
     * 删除数据
     */
    boolean deleteJzJbxxDeviceBind(DeleteCommonDTO<String> dto);

    /**
     * 修改数据
     */
    boolean updateJzJbxxDeviceBind(JzJbxxDeviceBindUpdateDTO dto);

    /**
     * 删除绑定数据
     */
    int deleteJzJbxxDeviceBind();

    /**
     * 修改绑定定位时间（app定位）
     */
    List<JzJbxxDeviceBindQueryResultDTO> updateLocateTimes(LocateTimesUpdateDTO dto);

    JzJbxxDeviceBindQueryResultDTO deleteLocateTimes(LocateTimesDeleteDTO dto);

    void updateFirstLocateTime(List<JzJbxxDeviceBindUpdateDTO> dtos);
    /**
     * 获取所有的有效的jzId集合
     */
    List<String> listJzIds(JzJbxxDeviceBindSimpleQueryParamDTO dto);

    JzJbxxDeviceBindSimpleQueryParamDTO getQueryParam4App();

    boolean existsJzJbxxDeviceBind4App(String jzId);

    JzJbxxDeviceBindWithLocateTimesDTO getJzJbxxDeviceBind4LocateTimes(String jzId);

    List<JzJbxxDeviceBindWithLocateTimesDTO> listJzJbxxDeviceBind4LocateTimes(JzJbxxDeviceBindSimpleQueryParamDTO dto);

    List<JzJbxxDeviceBindQueryResultDTO> listJzJbxxDeviceBind(JzJbxxDeviceBindSimpleQueryParamDTO dto);

    QueryPageResultDTO<JzJbxxDeviceBindQueryResultDTO> pageJzJbxxDeviceBind(JzJbxxDeviceBindSimpleQueryParamDTO dto, PageParamDTO page);

    List<JzJbxxDeviceBindWithJzJbxxDTO> listJzJbxxDeviceBindGroup(JzJbxxDeviceBindQueryParamDTO dto);

    QueryPageResultDTO<JzJbxxDeviceBindWithJzJbxxDTO> pageJzJbxxDeviceBindGroup(JzJbxxDeviceBindQueryParamDTO dto, PageParamDTO page);
}
